import md5 from "spark-md5";
// 获取文件hash
export default async function getFileHash(file: File): Promise<string> {
    const buffer = await file.arrayBuffer();
    const spark = new md5.ArrayBuffer();
    spark.append(buffer);
    const hash = spark.end();

    return hash;
}
